# -*- coding: utf-8 -*-
# @Time     : 2021/11/30 14:49
# @Author   : wljess
# @File     : 面向对象的方式创建进程.py
# @Describe : 
# @Software : PyCharm

from multiprocessing import Process


class MyProcess(Process):
    def __init__(self, x, y):
        self.x = x
        self.y = y
        super().__init__()

    def run(self):
        print("我是run方法...")
        print(self.x + self.y)


if __name__ == '__main__':
    p = MyProcess(10, 20)
    p.start()
